#include <stdio.h>
#include <string.h>

int StrCompare(char *arr1, char *arr2) {
    int N = strlen(arr1);
    if (N != strlen(arr2)) {
        return 0;
    }
    strncat(arr1, arr1, N); //仅支持VS编译器
    char *ret = strstr(arr1, arr2);
    return ret != NULL; //成立返回1，不成立返回0 (本题重点在这里)
}

int main() {
    char arr1[20];
    char arr2[20];
    printf("请输入两个数据:>");
    scanf("%s%s", arr1, arr2);
    int ret = StrCompare(arr1, arr2);
    if (ret == 1) {
        printf("是旋转字符串!");
    } else {
        printf("不是旋转字符串!");
    }
    return 0;
}